import request from '@/utils/request'

// 查询课程购买记录列表
export function listPurchaseRecords(query) {
  return request({
    url: '/st/purchaseRecords/list',
    method: 'get',
    params: query
  })
}

// 查询课程购买记录详细
export function getPurchaseRecords(id) {
  return request({
    url: '/st/purchaseRecords/' + id,
    method: 'get'
  })
}

// 新增课程购买记录
export function addPurchaseRecords(data) {
  return request({
    url: '/st/purchaseRecords',
    method: 'post',
    data: data
  })
}

// 修改课程购买记录
export function updatePurchaseRecords(data) {
  return request({
    url: '/st/purchaseRecords',
    method: 'put',
    data: data
  })
}

// 删除课程购买记录
export function delPurchaseRecords(id) {
  return request({
    url: '/st/purchaseRecords/' + id,
    method: 'delete'
  })
}
